<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
        <title>slider</title>
        <script src="zepto.min.js"></script>
        <script>
        //原理swipeLeft事件 
        $(document).ready(function(){
     

             $(document).on('touchend', function (e) {
                //var event = $.Event('fastclick');
                //e.target.dispatchEvent(event);
                $(e.target).trigger('swipeLeft');
             });

 
             $('#test').on('swipeLeft',function(){
                  alert('22');

             })

  
        });

        (function($,win){

            
            $.fn.swipeLeft = function(callback){ return this.on('swipeLeft', callback) }


        })(Zepto,window);


       



        </script>     

    </head>
<body>

    <div><button id='test'>test</button><div>


</body>
</html>


